<?php
function doproductoutput ()
{
			$sql = "
                SELECT *
                FROM Products
                ";
		  $conn = getConnection();
		  $prod = $conn->query($sql);
		  $conn->close();
		  return $prod;
}
function deleteImage()
{
   if (isset($_GET['id']) && (int)$_GET['id'] > 0) {
      $catId = (int)$_GET['id'];
   } else {
      header('Location: index.php');
   }

   _deleteImage($id);

   // update the image name in the database
   $sql = "UPDATE Products
           SET product_pic = ''
           WHERE id = $id";
   dbQuery($sql); 

   header("Location: edit.php?id=$id");
}

?>